<template>
  <div id="app" :style="appStyle">
    <!-- 路由组件 -->
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: 'App',
  components: {},
  data: function() {
    return {
      appStyle: {
        height: '',
        width: '',
      },
    }
  },

  created: function() {
    setTimeout(
      function() {
        this.init()
      }.bind(this),
      10
    )
  },

  methods: {
    init: async function() {
      // this.appStyle.height = '100%'
      this.appStyle.width = '100%'
    },
  },
}
</script>

<style scoped media="screen" lang="less">
/* 主节点 */
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;

  /* 留白问题 */
  padding: 0px;
  margin: 0px;
  position: absolute;
  top: 0px;
  left: 0px;
}

/* 以704为阶(星空的图片造成)响应高度差带来的留白 */
@media only screen and (min-height: 704px) {
  #app {
    height: 100%;
  }
}
</style>
